package com.wardrobe.dao.order_prepay_dao;


import com.wardrobe.domain.orderprepay.OrderPrepayBean;
import com.wardrobe.domain.orderprepay.OrderPrepayShowBean;
import com.wardrobe.mapper.master.order_prepay.OrderPrepayMasterMapper;
import com.wardrobe.mapper.slave.order_prepay.OrderPrepaySlaveMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2018/8/29.
 */
@Service
public class OrderPrePayDao {
    @Resource
    private OrderPrepayMasterMapper orderPrepayMasterMapper;
    @Resource
    private OrderPrepaySlaveMapper orderPrepaySlaveMapper;
    public int insertOrderPrepay(OrderPrepayBean orderPrepayBean){
        return orderPrepayMasterMapper.insertOrderPrepay(orderPrepayBean);
    }

    public int deleteOrderPrepay(long orderId){
        return orderPrepayMasterMapper.deleteOrderPrepay(orderId);
    }

    public OrderPrepayShowBean getOrderPrepayByOrderId(long orderId){
        return orderPrepaySlaveMapper.getOrderPrepayByOrderId(orderId);
    }
}
